package com.san.report.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.san.base.dao.ReportLogDao;
import com.san.metadata.domain.DataSourceDO;
import com.san.report.dao.LegalPersonReportManager;
import com.san.report.service.LegalPersonReportService;
import com.san.report.vo.LegalPersonReportBaseVO;

@Service
public class LegalPersonReportServiceImpl implements LegalPersonReportService {

	@Autowired
	LegalPersonReportManager legalPersonReportManager;

	@Autowired
	ReportLogDao reportLogMapper;

	@Override
	public List<Map<String, Object>> queryBusiDataByNode(Long busi_type_node, String legal_person_id) throws Exception {
		return legalPersonReportManager.Detail(busi_type_node, legal_person_id);
	}

	@Override
	public List<Map<String, Object>> queryReportList(DataSourceDO dataSourceDO, String legalPersonId, String busiSqldet)
			throws Exception {
		return legalPersonReportManager.queryReportList(dataSourceDO, legalPersonId, busiSqldet);
	}

	@Override
	public List<Map<String, Object>> listSnapshot(String legalPersonId, int limit, int offset) throws Exception {
		return legalPersonReportManager.listSnapshot(legalPersonId, limit, offset);
	}

	@Override
	public boolean save(String legalPersonId, String batch, int type, String content, String QRCode) throws Exception {
		return legalPersonReportManager.save(legalPersonId, batch, type, content, QRCode);
	}

	@Override
	public List<Map<String, Object>> viewSnapShot(String ssId) throws Exception {
		return legalPersonReportManager.viewSnapShot(ssId);
	}

	@Override
	public LegalPersonReportBaseVO queryBaseData(String legalPersonId,String tableName, String SourceCode) throws Exception {
		return legalPersonReportManager.queryBaseData(legalPersonId,tableName,SourceCode);
	}

}
